/**
 * TDS PEC 4
 * Grupo 3H2M 
 *
 * El paquete <code>edu.uoc.tds.pec4.conexion</code> agrupa todas las
 * interfaces, clases y elementos de la GUI para el control del subsistema de Conexion
 */

package edu.uoc.tds.pec4.conexion;

import edu.uoc.tds.pec4.beans.UsuarioDTO;
import edu.uoc.tds.pec4.common.util.TDSLanguageUtils;
import edu.uoc.tds.pec4.common.util.UtilidadesGUI;

/**
 * La clase <code>DialogDatosEmpleado</code> representa la interfaz de
 * usuario para mostrar los datos personales de un empleado.<br />
 *
 * Interficie donde se muestran los datos personales de un empleado.
 *
 * @author	Jaime Marcos de la Calle
 * @version	28/11/2011
 */
public class DialogDatosEmpleado extends javax.swing.JDialog {

    //variables de interfaz gráfica
    private javax.swing.JButton jButtonCancelar;
    private javax.swing.JButton jButtonGuardarCambios;
    private javax.swing.JLabel jLabelApellidos;
    private javax.swing.JLabel jLabelCodPostal;
    private javax.swing.JLabel jLabelDireccion;
    private javax.swing.JLabel jLabelEmail;
    private javax.swing.JLabel jLabelFax;
    private javax.swing.JLabel jLabelLocalidad;
    private javax.swing.JLabel jLabelLogin;
    private javax.swing.JLabel jLabelMovil;
    private javax.swing.JLabel jLabelNIF;
    private javax.swing.JLabel jLabelNombre;
    private javax.swing.JLabel jLabelPais;
    private javax.swing.JLabel jLabelPassword;
    private javax.swing.JLabel jLabelProvincia;
    private javax.swing.JLabel jLabelRepetirPassword;
    private javax.swing.JLabel jLabelTelefono;
    private javax.swing.JPanel jPanelDatosContacto;
    private javax.swing.JPanel jPanelDatosGenerales;
    private javax.swing.JPanel jPanelDireccion;
    private javax.swing.JPasswordField jPasswordFieldPassword1;
    private javax.swing.JPasswordField jPasswordFieldPassword2;
    private javax.swing.JTextField jTextFieldApellidos;
    private javax.swing.JTextField jTextFieldCP;
    private javax.swing.JTextField jTextFieldDireccion;
    private javax.swing.JTextField jTextFieldEmail;
    private javax.swing.JTextField jTextFieldFax;
    private javax.swing.JTextField jTextFieldLocalidad;
    private javax.swing.JTextField jTextFieldLogin;
    private javax.swing.JTextField jTextFieldMovil;
    private javax.swing.JTextField jTextFieldNIF;
    private javax.swing.JTextField jTextFieldNombre;
    private javax.swing.JTextField jTextFieldPais;
    private javax.swing.JTextField jTextFieldProvincia;
    private javax.swing.JTextField jTextFieldTelefono;
    
    /** Creates new form DialogDatosEmpleado */
    public DialogDatosEmpleado(java.awt.Frame parent, boolean modal, UsuarioDTO usuario) {
        super(parent, modal);
        initComponents();
        getDatos(usuario);

        // Centramos la ventana con respecto al padre
        UtilidadesGUI.centrarVentana(this, parent);
        setVisible(true);
    }

    private void getDatos(UsuarioDTO usuario){
        jTextFieldLogin.setText(usuario.getIdUsuario());
        jTextFieldNombre.setText(usuario.getNomUsuario());
        jTextFieldApellidos.setText(usuario.getApellidos());
        jTextFieldNIF.setText(usuario.getNIF());
        jPasswordFieldPassword1.setText(usuario.getPassword());
        jPasswordFieldPassword2.setText(usuario.getPassword());
        jTextFieldDireccion.setText(usuario.getDomicilio());
        jTextFieldProvincia.setText(usuario.getNomProvincia());
        jTextFieldLocalidad.setText(usuario.getNomCiudad());
        jTextFieldPais.setText(usuario.getNomPais());
        jTextFieldCP.setText(usuario.getCodPostal());
        jTextFieldTelefono.setText(usuario.getTelefono());
        jTextFieldMovil.setText(usuario.getMovil());
        jTextFieldFax.setText(usuario.getFax());
        jTextFieldEmail.setText(usuario.getEMail());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {

        jPanelDatosGenerales = new javax.swing.JPanel();
        jLabelLogin = new javax.swing.JLabel();
        jLabelNombre = new javax.swing.JLabel();
        jLabelApellidos = new javax.swing.JLabel();
        jLabelNIF = new javax.swing.JLabel();
        jLabelPassword = new javax.swing.JLabel();
        jLabelRepetirPassword = new javax.swing.JLabel();
        jTextFieldLogin = new javax.swing.JTextField();
        jTextFieldNombre = new javax.swing.JTextField();
        jTextFieldApellidos = new javax.swing.JTextField();
        jTextFieldNIF = new javax.swing.JTextField();
        jPasswordFieldPassword1 = new javax.swing.JPasswordField();
        jPasswordFieldPassword2 = new javax.swing.JPasswordField();
        jPanelDireccion = new javax.swing.JPanel();
        jLabelDireccion = new javax.swing.JLabel();
        jLabelLocalidad = new javax.swing.JLabel();
        jLabelProvincia = new javax.swing.JLabel();
        jLabelCodPostal = new javax.swing.JLabel();
        jLabelPais = new javax.swing.JLabel();
        jTextFieldDireccion = new javax.swing.JTextField();
        jTextFieldProvincia = new javax.swing.JTextField();
        jTextFieldLocalidad = new javax.swing.JTextField();
        jTextFieldPais = new javax.swing.JTextField();
        jTextFieldCP = new javax.swing.JTextField();
        jPanelDatosContacto = new javax.swing.JPanel();
        jLabelTelefono = new javax.swing.JLabel();
        jLabelEmail = new javax.swing.JLabel();
        jLabelMovil = new javax.swing.JLabel();
        jLabelFax = new javax.swing.JLabel();
        jTextFieldTelefono = new javax.swing.JTextField();
        jTextFieldEmail = new javax.swing.JTextField();
        jTextFieldMovil = new javax.swing.JTextField();
        jTextFieldFax = new javax.swing.JTextField();
        jButtonGuardarCambios = new javax.swing.JButton();
        jButtonCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jPanelDatosGenerales.setBorder(javax.swing.BorderFactory.createTitledBorder(null, TDSLanguageUtils.getMessage("dialogdatos.datosgenerales"), 
                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        jPanelDatosGenerales.setName(""); 

        jLabelLogin.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelLogin.setText(TDSLanguageUtils.getMessage("dialogdatos.label.login"));

        jLabelNombre.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelNombre.setText(TDSLanguageUtils.getMessage("dialogdatos.label.nombre"));

        jLabelApellidos.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelApellidos.setText(TDSLanguageUtils.getMessage("dialogdatos.label.apellidos"));

        jLabelNIF.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelNIF.setText(TDSLanguageUtils.getMessage("dialogdatos.label.nif"));

        jLabelPassword.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelPassword.setText(TDSLanguageUtils.getMessage("dialogdatos.label.password"));

        jLabelRepetirPassword.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelRepetirPassword.setText(TDSLanguageUtils.getMessage("dialogdatos.label.password2"));

        jTextFieldLogin.setEditable(false);

        javax.swing.GroupLayout jPanelDatosGeneralesLayout = new javax.swing.GroupLayout(jPanelDatosGenerales);
        jPanelDatosGenerales.setLayout(jPanelDatosGeneralesLayout);
        jPanelDatosGeneralesLayout.setHorizontalGroup(
            jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosGeneralesLayout.createSequentialGroup()
                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanelDatosGeneralesLayout.createSequentialGroup()
                        .addComponent(jLabelApellidos)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldApellidos))
                    .addGroup(jPanelDatosGeneralesLayout.createSequentialGroup()
                        .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelDatosGeneralesLayout.createSequentialGroup()
                                .addComponent(jLabelLogin)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jTextFieldLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelDatosGeneralesLayout.createSequentialGroup()
                                .addComponent(jLabelNombre)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(26, 26, 26)
                        .addComponent(jLabelNIF)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldNIF, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(25, 25, 25)
                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelRepetirPassword)
                    .addComponent(jLabelPassword))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPasswordFieldPassword1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPasswordFieldPassword2, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(50, Short.MAX_VALUE))
        );
        jPanelDatosGeneralesLayout.setVerticalGroup(
            jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosGeneralesLayout.createSequentialGroup()
                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelLogin)
                    .addComponent(jTextFieldLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNombre)
                    .addComponent(jLabelNIF)
                    .addComponent(jLabelPassword)
                    .addComponent(jTextFieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldNIF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPasswordFieldPassword1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelApellidos)
                    .addComponent(jLabelRepetirPassword)
                    .addComponent(jTextFieldApellidos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPasswordFieldPassword2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

      jPanelDireccion.setBorder(javax.swing.BorderFactory.createTitledBorder(null, 
              TDSLanguageUtils.getMessage("dialogdatos.direccion"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, 
              javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        jPanelDireccion.setName(""); 

        jLabelDireccion.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelDireccion.setText(TDSLanguageUtils.getMessage("dialogdatos.label.direccion"));

        jLabelLocalidad.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelLocalidad.setText(TDSLanguageUtils.getMessage("dialogdatos.label.localidad"));

        jLabelProvincia.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelProvincia.setText(TDSLanguageUtils.getMessage("dialogdatos.label.provincia"));

        jLabelCodPostal.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelCodPostal.setText(TDSLanguageUtils.getMessage("dialogdatos.label.cp"));

        jLabelPais.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelPais.setText(TDSLanguageUtils.getMessage("dialogdatos.label.pais"));

        javax.swing.GroupLayout jPanelDireccionLayout = new javax.swing.GroupLayout(jPanelDireccion);
        jPanelDireccion.setLayout(jPanelDireccionLayout);
        jPanelDireccionLayout.setHorizontalGroup(
            jPanelDireccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDireccionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDireccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanelDireccionLayout.createSequentialGroup()
                        .addComponent(jLabelDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jTextFieldDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelDireccionLayout.createSequentialGroup()
                        .addComponent(jLabelLocalidad)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextFieldLocalidad, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelProvincia)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldProvincia, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addGroup(jPanelDireccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanelDireccionLayout.createSequentialGroup()
                        .addComponent(jLabelCodPostal)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldCP))
                    .addGroup(jPanelDireccionLayout.createSequentialGroup()
                        .addComponent(jLabelPais, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jTextFieldPais, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(14, Short.MAX_VALUE))
        );
        jPanelDireccionLayout.setVerticalGroup(
            jPanelDireccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDireccionLayout.createSequentialGroup()
                .addGroup(jPanelDireccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelDireccion)
                    .addComponent(jTextFieldDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelCodPostal)
                    .addComponent(jTextFieldCP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDireccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelDireccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabelPais)
                        .addComponent(jLabelProvincia)
                        .addComponent(jTextFieldProvincia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jTextFieldPais, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelDireccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabelLocalidad)
                        .addComponent(jTextFieldLocalidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelDatosContacto.setBorder(javax.swing.BorderFactory.createTitledBorder(null, 
                TDSLanguageUtils.getMessage("dialogdatos.datoscontacto"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
                javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        jPanelDatosContacto.setName(""); 

        jLabelTelefono.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelTelefono.setText(TDSLanguageUtils.getMessage("dialogdatos.label.telefono"));

        jLabelEmail.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelEmail.setText(TDSLanguageUtils.getMessage("dialogdatos.label.mail"));

        jLabelMovil.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelMovil.setText(TDSLanguageUtils.getMessage("dialogdatos.label.movil"));

        jLabelFax.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelFax.setText(TDSLanguageUtils.getMessage("dialogdatos.label.fax"));

        javax.swing.GroupLayout jPanelDatosContactoLayout = new javax.swing.GroupLayout(jPanelDatosContacto);
        jPanelDatosContacto.setLayout(jPanelDatosContactoLayout);
        jPanelDatosContactoLayout.setHorizontalGroup(
            jPanelDatosContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosContactoLayout.createSequentialGroup()
                .addGroup(jPanelDatosContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanelDatosContactoLayout.createSequentialGroup()
                        .addGap(54, 54, 54)
                        .addComponent(jLabelTelefono)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextFieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(19, 19, 19)
                        .addComponent(jLabelMovil)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldMovil, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(15, 15, 15)
                        .addComponent(jLabelFax)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldFax))
                    .addGroup(jPanelDatosContactoLayout.createSequentialGroup()
                        .addComponent(jLabelEmail)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextFieldEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 434, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(13, Short.MAX_VALUE))
        );
        jPanelDatosContactoLayout.setVerticalGroup(
            jPanelDatosContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosContactoLayout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addGroup(jPanelDatosContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelFax)
                    .addComponent(jTextFieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelTelefono)
                    .addComponent(jLabelMovil)
                    .addComponent(jTextFieldMovil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldFax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEmail)
                    .addComponent(jTextFieldEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jButtonGuardarCambios.setFont(new java.awt.Font("Tahoma", 1, 11));
        jButtonGuardarCambios.setText(TDSLanguageUtils.getMessage("dialogdatos.boton.guardarcambios"));
        jButtonGuardarCambios.setEnabled(false);

        jButtonCancelar.setFont(new java.awt.Font("Tahoma", 1, 11));
        jButtonCancelar.setText(TDSLanguageUtils.getMessage("dialogdatos.boton.cancelar"));
        jButtonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCancelarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelDatosContacto, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanelDatosGenerales, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanelDireccion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGap(174, 174, 174)
                .addComponent(jButtonGuardarCambios)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonCancelar)
                .addContainerGap(186, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanelDatosGenerales, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(jPanelDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelDatosContacto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonGuardarCambios)
                    .addComponent(jButtonCancelar))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        pack();
    }

      /**
     * Este método cierra el JDialog cuando se presiona el boton Cancelar
     *
     */
    private void jButtonCancelarActionPerformed(java.awt.event.ActionEvent evt) {
        dispose();
    }
}
